package com.example.acontainerd.entity;

import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.util.Date;

import jakarta.persistence.Entity;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import jakarta.persistence.Version;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author william
 * @since 2025/8/13
 */
@Table(name = "T_ROLES")
@Entity
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
@EntityListeners(AuditingEntityListener.class)
public class RoleEntity {
    @Id
    private Long id;
    @CreatedDate
    private Date createDate;
    @CreatedBy
    private Long createUserId;
    @LastModifiedDate
    private Date updateDate;
    @LastModifiedBy
    private Long updateUserId;
    private Long del;
    @Version
    private Integer ver;

    private String code;
    private String name;
}
